//
//  StrateBigCollectionViewCell.m
//  BeautifulShoppings
//
//  Created by GivenBmli on 16/9/5.
//  Copyright © 2016年 GivenBmli. All rights reserved.
//

#import "StrateBigCollectionViewCell.h"
#import "StrateModel.h"
#import "UIImageView+WebCache.h"
#import "TAMacro.h"
@implementation StrateBigCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame {
    self =[super initWithFrame:frame];
    if (self) {
        [self creatSubView:frame];
    }
    return self;
}
- (void)setStrateModel:(StrateModel *)strateModel {
    self.name.text = strateModel.name;
    self.title.text =strateModel.title;
    [self.icon_url sd_setImageWithURL:[NSURL URLWithString:strateModel.icon_url] placeholderImage:[UIImage imageNamed:@"站位"]];
}
- (void)creatSubView:(CGRect)frame {
    self.name = [[UILabel alloc]initWithFrame:CGRectMake(0, SCREEN_WIDTH / 7, SCREEN_WIDTH / 5, SCREEN_HEIGHT / 30)];
    self.name.textAlignment = 1;
    [self.contentView addSubview:self.name];
    self.icon_url = [[UIImageView alloc]initWithFrame:CGRectMake(SCREEN_WIDTH/ 40, 0, SCREEN_WIDTH / 7, SCREEN_WIDTH / 7)];

    self.icon_url.layer.cornerRadius = (SCREEN_WIDTH / 7)/2;
    [self.contentView addSubview:self.icon_url];
    
}
@end
